package com.hs.sfzy.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hs.sfzy.entity.Mynotice;
import com.hs.sfzy.entity.Question;
import com.hs.sfzy.mapper.MynoticeMapper;
import com.hs.sfzy.service.MynoticeService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @BelongsProject: sfzyBackEnd
 * @BelongsPackage: com.hs.sfzy.service.impl
 * @ClassName MynoticeServiceImpl
 * @Author: 陈千鱼不是鱼
 * @CreateTime: 2024-10-28  14:25
 * @Description: TODO
 * @Version: 1.0
 */
@Service
@RequiredArgsConstructor
public class MynoticeServiceImpl implements MynoticeService {

    private final MynoticeMapper mynoticeMapper;

    @Override
    public PageInfo<Mynotice> page(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<Mynotice> list = mynoticeMapper.page();
        PageInfo<Mynotice> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }
}
